Handles an application close event.
HRESULT OnClose();
This method takes no parameters.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
S_OK
The method succeeded.
This method handles an application close event.